<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title>The Autoloader - Zend Framework Manual</title>

    <link href="../css/shCore.css" rel="stylesheet" type="text/css" />
    <link href="../css/shThemeDefault.css" rel="stylesheet" type="text/css" />
    <link href="../css/styles.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>Zend Framework</h1>
<h2>Programmer's Reference Guide</h2>
<ul>
    <li><a href="../en/zend.loader.autoloader.html">Inglês (English)</a></li>
    <li><a href="../pt-br/zend.loader.autoloader.html">Português Brasileiro (Brazilian Portuguese)</a></li>
</ul>
<table width="100%">
    <tr valign="top">
        <td width="85%">
            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.loader.load.html">Loading Files and Classes Dynamically</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.loader.html">Zend_Loader</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.loader.autoloader-resource.html">Resource Autoloaders</a></div>
                    </td>
                </tr>
            </table>
<hr />
<div id="zend.loader.autoloader" class="section"><div class="info"><h1 class="title">The Autoloader</h1></div>
    

    <p class="para">
        <span class="classname">Zend_Loader_Autoloader</span> introduces a comprehensive
        autoloading solution for Zend Framework. It has been designed with
        several goals in mind:
    </p>

    <ul class="itemizedlist">
        <li class="listitem">
            <p class="para">
                Provide a true namespace autoloader. (Previous incarnations
                intercepted all userland namespaces.)
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                Allow registering arbitrary callbacks as autoloaders, and manage
                them as a stack. (At the time of this writing, this overcomes some
                issues with <code class="code">spl_autoload</code>, which does not allow
                re-registering a callback that utilizes an instance method.)
            </p>
        </li>

        <li class="listitem">
            <p class="para">
                Allow optimistic matching of namespaces to provide faster class resolution.
            </p>
        </li>
    </ul>

    <p class="para">
        <span class="classname">Zend_Loader_Autoloader</span> implements a singleton, making it
        unversally accessible. This provides the ability to register additional
        autoloaders from anywhere in your code as necessary.
    </p>

    <div class="section" id="zend.loader.autoloader.usage"><div class="info"><h1 class="title">Using the Autoloader</h1></div>
        

        <p class="para">
            The first time an instance of the autoloader is retrieved, it
            registers itself with <code class="code">spl_autoload</code>. You retrieve an
            instance using the  <span class="methodname">getInstance()</span> method:
        </p>

        <pre class="programlisting brush: php">
$autoloader = Zend_Loader_Autoloader::getInstance();
</pre>


        <p class="para">
            By default, the autoloader is configured to match the &quot;Zend_&quot; and
            &quot;ZendX_&quot; namespaces. If you have your own library code that uses
            your own namespace, you may register it with the autoloader using
            the  <span class="methodname">registerNamespace()</span> method. For instance, if your
            library code is prefixed with &quot;My_&quot;, you could do so as follows:
        </p>

        <pre class="programlisting brush: php">
$autoloader-&gt;registerNamespace(&#039;My_&#039;);
</pre>


        <blockquote class="note"><p><b class="note">Note</b>: <span class="info"><b>Namespace Prefixes</b><br /></span>
            

            <p class="para">
                You&#039;ll note that the previous example uses &quot;My_&quot; and not &quot;My&quot;.
                This is because <span class="classname">Zend_Loader_Autoloader</span> is intended
                as a general purpose autoloader, and does not make the
                assumption that a given class prefix namespace includes an
                underscore. If your class namespace <em class="emphasis">does</em>
                include one, you should include it when registering your
                namespace.
            </p>
        </p></blockquote>

        <p class="para">
            You can also register arbitrary autoloader callbacks, optionally
            with a specific namespace (or group of namespaces).
            <span class="classname">Zend_Loader_Autoloader</span> will attempt to match these
            first before using its internal autoloading mechanism.
        </p>

        <p class="para">
            As an example, you may want to utilize one or more eZcomponents
            components with your Zend Framework application. To use its
            autoloading capabilities, push it onto the autoloader stack using
             <span class="methodname">pushAutoloader()</span>:
        </p>

        <pre class="programlisting brush: php">
$autoloader-&gt;pushAutoloader(array(&#039;ezcBase&#039;, &#039;autoload&#039;), &#039;ezc&#039;);
</pre>


        <p class="para">
            This tells the autoloader to use the eZcomponents autoloader for
            classes beginning with &quot;ezc&quot;.
        </p>

        <p class="para">
            You can use the  <span class="methodname">unshiftAutoloader()</span> method to add the
            autoloader to the beginning of the autoloader chain.
        </p>

        <p class="para">
            By default, <span class="classname">Zend_Loader_Autoloader</span> does no error
            suppression when using its internal autoloader, which utilizes
             <span class="methodname">Zend_Loader::loadClass()</span>. Most of the time, this is
            exactly what you want. However, there may be cases where you want to
            suppress them. You can do this using
             <span class="methodname">suppressNotFoundWarnings()</span>:
        </p>

        <pre class="programlisting brush: php">
$autoloader-&gt;suppressNotFoundWarnings(true);
</pre>


        <p class="para">
            Finally, there may be times when you want the autoloader to load any
            namespace. For instance, PEAR libraries do not share a common
            namespace, making specifying individual namespaces difficult when
            many PEAR components are in use. You can use the
             <span class="methodname">setFallbackAutoloader()</span> method to have the autoloader
            act as a catch-all:
        </p>

        <pre class="programlisting brush: php">
$autoloader-&gt;setFallbackAutoloader(true);
</pre>


        <blockquote class="note"><p><b class="note">Note</b>: <span class="info"><b>Loading Classes from PHP Namespaces</b><br /></span>
            

            <p class="para">
                Starting in version 1.10.0, Zend Framework now allows loading classes from
                <acronym class="acronym">PHP</acronym> namespaces. This support follows the same guidelines and
                implementation as that found in the <a href="http://groups.google.com/group/php-standards/web/psr-0-final-proposal" class="link external">&raquo; PHP
                Framework Interop Group PSR-0</a> reference implementation.
            </p>

            <p class="para">
                Under this guideline, the following rules apply:
            </p>

            <ul class="itemizedlist">
                <li class="listitem">
                    <p class="para">
                        Each namespace separator is converted to a
                        <b><tt>DIRECTORY_SEPARATOR</tt></b> when loading from the file system.
                    </p>
                </li>

                <li class="listitem">
                    <p class="para">
                        Each &quot;_&quot; character in the <em class="emphasis">CLASS NAME</em> is converted to a
                        <b><tt>DIRECTORY_SEPARATOR</tt></b>. The &quot;_&quot; character has no special
                        meaning in the namespace.
                    </p>
                </li>

                <li class="listitem">
                    <p class="para">
                        The fully-qualified namespace and class is suffixed with &quot;.php&quot; when loading
                        from the file system.
                    </p>
                </li>
            </ul>

            <p class="para">
                As examples:
            </p>

            <ul class="itemizedlist">
                <li class="listitem">
                    <p class="para">
                        <span class="classname">\Doctrine\Common\IsolatedClassLoader</span> =&gt;
                        <var class="filename">/path/to/project/lib/vendor/Doctrine/Common/IsolatedClassLoader.php</var>
                    </p>
                </li>

                <li class="listitem">
                    <p class="para">
                        <span class="classname">\namespace\package\Class_Name</span> =&gt;
                        <var class="filename">/path/to/project/lib/vendor/namespace/package/Class/Name.php</var>
                    </p>
                </li>

                <li class="listitem">
                    <p class="para">
                        <span class="classname">\namespace\package_name\Class_Name</span> =&gt;
                        <var class="filename">/path/to/project/lib/vendor/namespace/package_name/Class/Name.php</var>
                    </p>
                </li>
            </ul>
        </p></blockquote>
    </div>

    <div class="section" id="zend.loader.autoloader.zf-version"><div class="info"><h1 class="title">Selecting a Zend Framework version</h1></div>
        

        <p class="para">
            Typically, you will use the version of Zend Framework that the autoloader you
            instantiate came with. However, when developing a project, it&#039;s often useful to track
            specific versions, major or minor branches, or just the latest version.
            <span class="classname">Zend_Loader_Autoloader</span>, as of version 1.10, offers some features
            to help manage this task.
        </p>

        <p class="para">
            Imagine the following scenario:
        </p>

        <ul class="itemizedlist">
            <li class="listitem">
                <p class="para">
                    During <em class="emphasis">development</em>, you want to track the latest version of
                    Zend Framework you have installed, so that you can ensure the application works
                    when you upgrade between versions.
                </p>

                <p class="para">
                    When pushing to <em class="emphasis">Quality Assurance</em>, however, you need to
                    have slightly more stability, so you want to use the latest installed revision
                    of a specific minor version.
                </p>

                <p class="para">
                    Finally, when you push to <em class="emphasis">production</em>, you want to pin to a
                    specific installed version, to ensure no breakage occurs if or when you add new
                    versions of Zend Framework to you server.
                </p>
            </li>
        </ul>

        <p class="para">
            The autoloader allows you to do this with the method
             <span class="methodname">setZfPath()</span>. This method takes two arguments, a
            <em class="emphasis">path</em> to a set of Zend Framework installations, and a
            <em class="emphasis">version</em> to use. Once invoked, it prepends a path to the
            <b><tt>include_path</tt></b> pointing to the appropriate Zend Framework
            installation library.
        </p>

        <p class="para">
            The directory you specify as your <em class="emphasis">path</em> should have a tree such as
            the following:
        </p>

        <pre class="programlisting brush: text">
ZendFramework/
|-- 1.9.2/
|   |-- library/
|-- ZendFramework-1.9.1-minimal/
|   |-- library/
|-- 1.8.4PL1/
|   |-- library/
|-- 1.8.4/
|   |-- library/
|-- ZendFramework-1.8.3/
|   |-- library/
|-- 1.7.8/
|   |-- library/
|-- 1.7.7/
|   |-- library/
|-- 1.7.6/
|   |-- library/
</pre>


        <p class="para">
            (where <em class="emphasis">path</em> points to the directory &quot;ZendFramework&quot; in the above
            example)
        </p>

        <p class="para">
            Note that each subdirectory should contain the directory <var class="filename">library</var>,
            which contains the actual Zend Framework library code. The individual subdirectory names
            may be version numbers, or simply be the untarred contents of a standard Zend Framework
            distribution tarball/zipfile.
        </p>

        <p class="para">
            Now, let&#039;s address the use cases. In the first use case, in
            <em class="emphasis">development</em>, we want to track the latest source install. We can do
            that by passing &quot;latest&quot; as the version:
        </p>

        <pre class="programlisting brush: php">
$autoloader-&gt;setZfPath($path, &#039;latest&#039;);
</pre>


        <p class="para">
            In the example from above, this will map to the directory
            <var class="filename">ZendFramework/1.9.2/library/</var>; you can verify this by checking the
            return value of  <span class="methodname">getZfPath()</span>.
        </p>

        <p class="para">
            In the second situation, for <em class="emphasis">quality assurance</em>, let&#039;s say we want
            to pin to the 1.8 minor release, using the latest install you have for that release. You
            can do so as follows:
        </p>

        <pre class="programlisting brush: php">
$autoloader-&gt;setZfPath($path, &#039;1.8&#039;);
</pre>


        <p class="para">
            In this case, it will find the directory
            <var class="filename">ZendFramework/1.8.4PL1/library/</var>.
        </p>

        <p class="para">
            In the final case, for <em class="emphasis">production</em>, we&#039;ll pin to a specific version
            -- 1.7.7, since that was what was available when Quality Assurance tested prior to our
            release.
        </p>

        <pre class="programlisting brush: php">
$autoloader-&gt;setZfPath($path, &#039;1.7.7&#039;);
</pre>


        <p class="para">
            Predictably, it finds the directory <var class="filename">ZendFramework/1.7.7/library/</var>.
        </p>

        <p class="para">
            You can also specify these values in the configuration file you use with
            <var class="filename">Zend_Application</var>. To do so, you&#039;d specify the following
            information:
        </p>

        <pre class="programlisting brush: ini">
[production]
autoloaderZfPath = &quot;path/to/ZendFramework&quot;
autoloaderZfVersion = &quot;1.7.7&quot;

[qa]
autoloaderZfVersion = &quot;1.8&quot;

[development]
autoloaderZfVersion = &quot;latest&quot;
</pre>


        <p class="para">
            Note the different environment sections, and the different version specified in each
            environment; these factors will allow <span class="classname">Zend_Application</span> to
            configure the autoloader appropriately.
        </p>

        <div class="warning"><b class="warning">Warning</b><div class="info"><h1 class="title">Performance implications</h1></div>
            

            <p class="para">
                For best performance, either do not use this feature, or specify a specific Zend
                Framework version (i.e., not &quot;latest&quot;, a major revision such as &quot;1&quot;, or a minor
                revision such as &quot;1.8&quot;). Otherwise, the autoloader will need to scan the provided
                path for directories matching the criteria -- a somewhat expensive operation to
                perform on each request.
            </p>
        </div>
    </div>

    <div class="section" id="zend.loader.autoloader.interface"><div class="info"><h1 class="title">The Autoloader Interface</h1></div>
        

        <p class="para">
            Besides being able to specify arbitrary callbacks as autoloaders,
            Zend Framework also defines an interface autoloading classes may
            imlement, <span class="classname">Zend_Loader_Autoloader_Interface</span>:
        </p>

        <pre class="programlisting brush: php">
interface Zend_Loader_Autoloader_Interface
{
    public function autoload($class);
}
</pre>


        <p class="para">
            When using this interface, you can simply pass a class instance to
            <span class="classname">Zend_Loader_Autoloader</span>&#039;s
             <span class="methodname">pushAutoloader()</span>
            and  <span class="methodname">unshiftAutoloader()</span> methods:
        </p>

        <pre class="programlisting brush: php">
// Assume Foo_Autoloader implements Zend_Loader_Autoloader_Interface:
$foo = new Foo_Autoloader();

$autoloader-&gt;pushAutoloader($foo, &#039;Foo_&#039;);
</pre>

    </div>

    <div class="section" id="zend.loader.autoloader.reference"><div class="info"><h1 class="title">Autoloader Reference</h1></div>
        

        <p class="para">
            Below, please find a guide to the methods available in
            <span class="classname">Zend_Loader_Autoloader</span>.
        </p>

        <table id="zend.loader.autoloader.reference.api" class="doctable table"><div class="info"><caption><b>Zend_Loader_Autoloader Methods</b></caption></div>
            

            
                <thead valign="middle">
                    <tr valign="middle">
                        <th>Method</th>
                        <th>Return Value</th>
                        <th>Parameters</th>
                        <th>Description</th>
                    </tr>

                </thead>


                <tbody valign="middle" class="tbody">
                    <tr valign="middle">
                        <td align="left"> <span class="methodname">getInstance()</span></td>
                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>
                        <td align="left">N/A</td>

                        <td align="left">
                            <p class="para">
                                Retrieve the <span class="classname">Zend_Loader_Autoloader</span>
                                singleton instance. On first retrieval, it registers
                                itself with <code class="code">spl_autoload</code>. This method is static.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">resetInstance()</span></td>
                        <td align="left"><code class="code">void</code></td>
                        <td align="left">N/A</td>

                        <td align="left">
                            <p class="para">
                                Resets the state of the
                                <span class="classname">Zend_Loader_Autoloader</span> singleton instance to
                                it&#039;s original state, unregistering all autoloader callbacks and all
                                registered namespaces.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">autoload($class)</span></td>
                        <td align="left"><code class="code">string|<b><tt>FALSE</tt></b></code></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$class</var>, <em class="emphasis">required</em>.
                                        A string class name to load.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">Attempt to resolve a class name to a file and load it.</p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">setDefaultAutoloader($callback)</span></td>
                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$callback</var>, <em class="emphasis">required</em>.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Specify an alternate <acronym class="acronym">PHP</acronym> callback to use for the
                                default autoloader implementation.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">getDefaultAutoloader()</span></td>
                        <td align="left"><code class="code">callback</code></td>
                        <td align="left">N/A</td>

                        <td align="left">
                            <p class="para">
                                Retrieve the default autoloader implementation; by default, this is
                                 <span class="methodname">Zend_Loader::loadClass()</span>.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">setAutoloaders(array $autoloaders)</span></td>
                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$autoloaders</var>,
                                        <em class="emphasis">required</em>.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Set a list of concrete autoloaders to use in the
                                autoloader stack. Each item in the autoloaders array
                                must be a <acronym class="acronym">PHP</acronym> callback.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">getAutoloaders()</span></td>
                        <td align="left"><span class="type">Array</span></td>
                        <td align="left">N/A</td>
                        <td align="left"><p class="para">Retrieve the internal autoloader stack.</p></td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">getNamespaceAutoloaders($namespace)</span></td>
                        <td align="left"><span class="type">Array</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$namespace</var>, <em class="emphasis">required</em>
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Fetch all autoloaders that have registered to load a
                                specific namespace.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">registerNamespace($namespace)</span></td>
                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$namespace</var>,
                                        <em class="emphasis">required</em>.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Register one or more namespaces with the default
                                autoloader. If <var class="varname">$namespace</var> is a string,
                                it registers that namespace; if it&#039;s an array of
                                strings, registers each as a namespace.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">unregisterNamespace($namespace)</span></td>
                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$namespace</var>,
                                        <em class="emphasis">required</em>.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Unregister one or more namespaces from the default
                                autoloader. If <var class="varname">$namespace</var> is a string,
                                it unregisters that namespace; if it&#039;s an array of
                                strings, unregisters each as a namespace.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">getRegisteredNamespaces()</span></td>
                        <td align="left"><span class="type">Array</span></td>
                        <td align="left">N/A</td>

                        <td align="left">
                            <p class="para">
                                Returns an array of all namespaces registered with the default
                                autoloader.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left">
                             <span class="methodname">suppressNotFoundWarnings($flag = null)</span>
                        </td>

                        <td align="left"><code class="code">boolean|Zend_Loader_Autoloader</code></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$flag</var>, <em class="emphasis">optional</em>.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Set or retrieve the value of the flag used to
                                indicate whether the default autoloader
                                implementation should suppress &quot;file not found&quot;
                                warnings. If no arguments or a <b><tt>NULL</tt></b> value is
                                passed, returns a boolean indicating the status of the flag;
                                if a boolean is passed, the flag is set to that
                                value and the autoloader instance is returned (to
                                allow method chaining).
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">setFallbackAutoloader($flag)</span></td>
                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$flag</var>, <em class="emphasis">required</em>.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Set the value of the flag used to indicate whether
                                or not the default autoloader should be used as a
                                fallback or catch-all autoloader for all namespaces.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">isFallbackAutoloader()</span></td>
                        <td align="left"><span class="type">Boolean</span></td>
                        <td align="left">N/A</td>
                        <td align="left">
                            <p class="para">
                                Retrieve the value of the flag used to indicate whether
                                or not the default autoloader should be used as a
                                fallback or catch-all autoloader for all namespaces.
                                By default, this is <b><tt>FALSE</tt></b>.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left"> <span class="methodname">getClassAutoloaders($class)</span></td>
                        <td align="left"><span class="type">Array</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$class</var>, <em class="emphasis">required</em>.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Get the list of namespaced autoloaders that could
                                potentially match the provided class. If none match,
                                all global (non-namespaced) autoloaders are returned.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left">
                             <span class="methodname">unshiftAutoloader($callback, $namespace = &#039;&#039;)</span>
                        </td>

                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$callback</var>, <em class="emphasis">required</em>.
                                        A valid <acronym class="acronym">PHP</acronym> callback
                                    </p>
                                </li>

                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$namespace</var>,
                                        <em class="emphasis">optional</em>. A string representing a class
                                        prefix namespace.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Add a concrete autoloader implementation to the
                                beginning of the internal autoloader stack. If a
                                namespace is provided, that namespace will be used
                                to match optimistically; otherwise, the autoloader
                                will be considered a global autoloader.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left">
                             <span class="methodname">pushAutoloader($callback, $namespace = &#039;&#039;)</span>
                        </td>
                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$callback</var>, <em class="emphasis">required</em>.
                                        A valid <acronym class="acronym">PHP</acronym> callback
                                    </p>
                                </li>

                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$namespace</var>,
                                        <em class="emphasis">optional</em>. A string representing a class
                                        prefix namespace.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Add a concrete autoloader implementation to the
                                end of the internal autoloader stack. If a
                                namespace is provided, that namespace will be used
                                to match optimistically; otherwise, the autoloader
                                will be considered a global autoloader.
                            </p>
                        </td>
                    </tr>


                    <tr valign="middle">
                        <td align="left">
                             <span class="methodname">removeAutoloader($callback, $namespace = &#039;&#039;)</span>
                        </td>

                        <td align="left"><span class="classname">Zend_Loader_Autoloader</span></td>

                        <td align="left">
                            <ul class="itemizedlist">
                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$callback</var>, <em class="emphasis">required</em>.
                                        A valid <acronym class="acronym">PHP</acronym> callback
                                    </p>
                                </li>

                                <li class="listitem">
                                    <p class="para">
                                        <var class="varname">$namespace</var>,
                                        <em class="emphasis">optional</em>. A string representing a class
                                        prefix namespace, or an array of namespace strings.
                                    </p>
                                </li>
                            </ul>
                        </td>

                        <td align="left">
                            <p class="para">
                                Remove a concrete autoloader implementation from
                                the internal autoloader stack. If a namespace or
                                namespaces are provided, the callback will be
                                removed from that namespace or namespaces only.
                            </p>
                        </td>
                    </tr>

                </tbody>
            
        </table>

    </div>
</div>
        <hr />

            <table width="100%">
                <tr>
                    <td width="25%" style="text-align: left;">
                    <a href="zend.loader.load.html">Loading Files and Classes Dynamically</a>
                    </td>

                    <td width="50%" style="text-align: center;">
                        <div class="up"><span class="up"><a href="zend.loader.html">Zend_Loader</a></span><br />
                        <span class="home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></span></div>
                    </td>

                    <td width="25%" style="text-align: right;">
                        <div class="next" style="text-align: right; float: right;"><a href="zend.loader.autoloader-resource.html">Resource Autoloaders</a></div>
                    </td>
                </tr>
            </table>
</td>
        <td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
	float: left;
	width: 186px;
	padding: 5px;
	font-size: smaller;
}
ul.toc {
	margin: 0px 5px 5px 5px;
	padding: 0px;
}
ul.toc li {
	font-size: 85%;
	margin: 1px 0 1px 1px;
	padding: 1px 0 1px 11px;
	list-style-type: none;
	background-repeat: no-repeat;
	background-position: center left;
}
ul.toc li.header {
	font-size: 115%;
	padding: 5px 0px 5px 11px;
	border-bottom: 1px solid #cccccc;
	margin-bottom: 5px;
}
ul.toc li.active {
	font-weight: bold;
}
ul.toc li a {
	text-decoration: none;
}
ul.toc li a:hover {
	text-decoration: underline;
}
</style>
 <ul class="toc">
  <li class="header home"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="manual.html">Guia de Refer&ecirc;ncia do Programador</a></li>
  <li class="header up"><a href="reference.html">Refer&ecirc;ncia do Zend Framework</a></li>
  <li class="header up"><a href="zend.loader.html">Zend_Loader</a></li>
  <li><a href="zend.loader.load.html">Loading Files and Classes Dynamically</a></li>
  <li class="active"><a href="zend.loader.autoloader.html">The Autoloader</a></li>
  <li><a href="zend.loader.autoloader-resource.html">Resource Autoloaders</a></li>
  <li><a href="zend.loader.pluginloader.html">Loading Plugins</a></li>
 </ul>
 </td>
    </tr>
</table>

<script type="text/javascript" src="../js/shCore.js"></script>
<script type="text/javascript" src="../js/shAutoloader.js"></script>
<script type="text/javascript" src="../js/main.js"></script>

</body>
</html>